package cn.com.darly.vpm.business.conversation.bean;

import cn.com.darly.vpm.framework.base.Criterion;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class ConversationMessageExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public ConversationMessageExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdIsNull() {
            addCriterion("ID is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("ID is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(String value) {
            addCriterion("ID =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(String value) {
            addCriterion("ID <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(String value) {
            addCriterion("ID >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(String value) {
            addCriterion("ID >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(String value) {
            addCriterion("ID <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(String value) {
            addCriterion("ID <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLike(String value) {
            addCriterion("ID like", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotLike(String value) {
            addCriterion("ID not like", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<String> values) {
            addCriterion("ID in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<String> values) {
            addCriterion("ID not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(String value1, String value2) {
            addCriterion("ID between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(String value1, String value2) {
            addCriterion("ID not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andMsgFromIsNull() {
            addCriterion("MSG_FROM is null");
            return (Criteria) this;
        }

        public Criteria andMsgFromIsNotNull() {
            addCriterion("MSG_FROM is not null");
            return (Criteria) this;
        }

        public Criteria andMsgFromEqualTo(String value) {
            addCriterion("MSG_FROM =", value, "msgFrom");
            return (Criteria) this;
        }

        public Criteria andMsgFromNotEqualTo(String value) {
            addCriterion("MSG_FROM <>", value, "msgFrom");
            return (Criteria) this;
        }

        public Criteria andMsgFromGreaterThan(String value) {
            addCriterion("MSG_FROM >", value, "msgFrom");
            return (Criteria) this;
        }

        public Criteria andMsgFromGreaterThanOrEqualTo(String value) {
            addCriterion("MSG_FROM >=", value, "msgFrom");
            return (Criteria) this;
        }

        public Criteria andMsgFromLessThan(String value) {
            addCriterion("MSG_FROM <", value, "msgFrom");
            return (Criteria) this;
        }

        public Criteria andMsgFromLessThanOrEqualTo(String value) {
            addCriterion("MSG_FROM <=", value, "msgFrom");
            return (Criteria) this;
        }

        public Criteria andMsgFromLike(String value) {
            addCriterion("MSG_FROM like", value, "msgFrom");
            return (Criteria) this;
        }

        public Criteria andMsgFromNotLike(String value) {
            addCriterion("MSG_FROM not like", value, "msgFrom");
            return (Criteria) this;
        }

        public Criteria andMsgFromIn(List<String> values) {
            addCriterion("MSG_FROM in", values, "msgFrom");
            return (Criteria) this;
        }

        public Criteria andMsgFromNotIn(List<String> values) {
            addCriterion("MSG_FROM not in", values, "msgFrom");
            return (Criteria) this;
        }

        public Criteria andMsgFromBetween(String value1, String value2) {
            addCriterion("MSG_FROM between", value1, value2, "msgFrom");
            return (Criteria) this;
        }

        public Criteria andMsgFromNotBetween(String value1, String value2) {
            addCriterion("MSG_FROM not between", value1, value2, "msgFrom");
            return (Criteria) this;
        }

        public Criteria andMsgToIsNull() {
            addCriterion("MSG_TO is null");
            return (Criteria) this;
        }

        public Criteria andMsgToIsNotNull() {
            addCriterion("MSG_TO is not null");
            return (Criteria) this;
        }

        public Criteria andMsgToEqualTo(String value) {
            addCriterion("MSG_TO =", value, "msgTo");
            return (Criteria) this;
        }

        public Criteria andMsgToNotEqualTo(String value) {
            addCriterion("MSG_TO <>", value, "msgTo");
            return (Criteria) this;
        }

        public Criteria andMsgToGreaterThan(String value) {
            addCriterion("MSG_TO >", value, "msgTo");
            return (Criteria) this;
        }

        public Criteria andMsgToGreaterThanOrEqualTo(String value) {
            addCriterion("MSG_TO >=", value, "msgTo");
            return (Criteria) this;
        }

        public Criteria andMsgToLessThan(String value) {
            addCriterion("MSG_TO <", value, "msgTo");
            return (Criteria) this;
        }

        public Criteria andMsgToLessThanOrEqualTo(String value) {
            addCriterion("MSG_TO <=", value, "msgTo");
            return (Criteria) this;
        }

        public Criteria andMsgToLike(String value) {
            addCriterion("MSG_TO like", value, "msgTo");
            return (Criteria) this;
        }

        public Criteria andMsgToNotLike(String value) {
            addCriterion("MSG_TO not like", value, "msgTo");
            return (Criteria) this;
        }

        public Criteria andMsgToIn(List<String> values) {
            addCriterion("MSG_TO in", values, "msgTo");
            return (Criteria) this;
        }

        public Criteria andMsgToNotIn(List<String> values) {
            addCriterion("MSG_TO not in", values, "msgTo");
            return (Criteria) this;
        }

        public Criteria andMsgToBetween(String value1, String value2) {
            addCriterion("MSG_TO between", value1, value2, "msgTo");
            return (Criteria) this;
        }

        public Criteria andMsgToNotBetween(String value1, String value2) {
            addCriterion("MSG_TO not between", value1, value2, "msgTo");
            return (Criteria) this;
        }

        public Criteria andMsgTypeIsNull() {
            addCriterion("MSG_TYPE is null");
            return (Criteria) this;
        }

        public Criteria andMsgTypeIsNotNull() {
            addCriterion("MSG_TYPE is not null");
            return (Criteria) this;
        }

        public Criteria andMsgTypeEqualTo(String value) {
            addCriterion("MSG_TYPE =", value, "msgType");
            return (Criteria) this;
        }

        public Criteria andMsgTypeNotEqualTo(String value) {
            addCriterion("MSG_TYPE <>", value, "msgType");
            return (Criteria) this;
        }

        public Criteria andMsgTypeGreaterThan(String value) {
            addCriterion("MSG_TYPE >", value, "msgType");
            return (Criteria) this;
        }

        public Criteria andMsgTypeGreaterThanOrEqualTo(String value) {
            addCriterion("MSG_TYPE >=", value, "msgType");
            return (Criteria) this;
        }

        public Criteria andMsgTypeLessThan(String value) {
            addCriterion("MSG_TYPE <", value, "msgType");
            return (Criteria) this;
        }

        public Criteria andMsgTypeLessThanOrEqualTo(String value) {
            addCriterion("MSG_TYPE <=", value, "msgType");
            return (Criteria) this;
        }

        public Criteria andMsgTypeLike(String value) {
            addCriterion("MSG_TYPE like", value, "msgType");
            return (Criteria) this;
        }

        public Criteria andMsgTypeNotLike(String value) {
            addCriterion("MSG_TYPE not like", value, "msgType");
            return (Criteria) this;
        }

        public Criteria andMsgTypeIn(List<String> values) {
            addCriterion("MSG_TYPE in", values, "msgType");
            return (Criteria) this;
        }

        public Criteria andMsgTypeNotIn(List<String> values) {
            addCriterion("MSG_TYPE not in", values, "msgType");
            return (Criteria) this;
        }

        public Criteria andMsgTypeBetween(String value1, String value2) {
            addCriterion("MSG_TYPE between", value1, value2, "msgType");
            return (Criteria) this;
        }

        public Criteria andMsgTypeNotBetween(String value1, String value2) {
            addCriterion("MSG_TYPE not between", value1, value2, "msgType");
            return (Criteria) this;
        }

        public Criteria andMsgTimeIsNull() {
            addCriterion("MSG_TIME is null");
            return (Criteria) this;
        }

        public Criteria andMsgTimeIsNotNull() {
            addCriterion("MSG_TIME is not null");
            return (Criteria) this;
        }

        public Criteria andMsgTimeEqualTo(Date value) {
            addCriterion("MSG_TIME =", value, "msgTime");
            return (Criteria) this;
        }

        public Criteria andMsgTimeNotEqualTo(Date value) {
            addCriterion("MSG_TIME <>", value, "msgTime");
            return (Criteria) this;
        }

        public Criteria andMsgTimeGreaterThan(Date value) {
            addCriterion("MSG_TIME >", value, "msgTime");
            return (Criteria) this;
        }

        public Criteria andMsgTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("MSG_TIME >=", value, "msgTime");
            return (Criteria) this;
        }

        public Criteria andMsgTimeLessThan(Date value) {
            addCriterion("MSG_TIME <", value, "msgTime");
            return (Criteria) this;
        }

        public Criteria andMsgTimeLessThanOrEqualTo(Date value) {
            addCriterion("MSG_TIME <=", value, "msgTime");
            return (Criteria) this;
        }

        public Criteria andMsgTimeIn(List<Date> values) {
            addCriterion("MSG_TIME in", values, "msgTime");
            return (Criteria) this;
        }

        public Criteria andMsgTimeNotIn(List<Date> values) {
            addCriterion("MSG_TIME not in", values, "msgTime");
            return (Criteria) this;
        }

        public Criteria andMsgTimeBetween(Date value1, Date value2) {
            addCriterion("MSG_TIME between", value1, value2, "msgTime");
            return (Criteria) this;
        }

        public Criteria andMsgTimeNotBetween(Date value1, Date value2) {
            addCriterion("MSG_TIME not between", value1, value2, "msgTime");
            return (Criteria) this;
        }

        public Criteria andMsgOtherIsNull() {
            addCriterion("MSG_OTHER is null");
            return (Criteria) this;
        }

        public Criteria andMsgOtherIsNotNull() {
            addCriterion("MSG_OTHER is not null");
            return (Criteria) this;
        }

        public Criteria andMsgOtherEqualTo(String value) {
            addCriterion("MSG_OTHER =", value, "msgOther");
            return (Criteria) this;
        }

        public Criteria andMsgOtherNotEqualTo(String value) {
            addCriterion("MSG_OTHER <>", value, "msgOther");
            return (Criteria) this;
        }

        public Criteria andMsgOtherGreaterThan(String value) {
            addCriterion("MSG_OTHER >", value, "msgOther");
            return (Criteria) this;
        }

        public Criteria andMsgOtherGreaterThanOrEqualTo(String value) {
            addCriterion("MSG_OTHER >=", value, "msgOther");
            return (Criteria) this;
        }

        public Criteria andMsgOtherLessThan(String value) {
            addCriterion("MSG_OTHER <", value, "msgOther");
            return (Criteria) this;
        }

        public Criteria andMsgOtherLessThanOrEqualTo(String value) {
            addCriterion("MSG_OTHER <=", value, "msgOther");
            return (Criteria) this;
        }

        public Criteria andMsgOtherLike(String value) {
            addCriterion("MSG_OTHER like", value, "msgOther");
            return (Criteria) this;
        }

        public Criteria andMsgOtherNotLike(String value) {
            addCriterion("MSG_OTHER not like", value, "msgOther");
            return (Criteria) this;
        }

        public Criteria andMsgOtherIn(List<String> values) {
            addCriterion("MSG_OTHER in", values, "msgOther");
            return (Criteria) this;
        }

        public Criteria andMsgOtherNotIn(List<String> values) {
            addCriterion("MSG_OTHER not in", values, "msgOther");
            return (Criteria) this;
        }

        public Criteria andMsgOtherBetween(String value1, String value2) {
            addCriterion("MSG_OTHER between", value1, value2, "msgOther");
            return (Criteria) this;
        }

        public Criteria andMsgOtherNotBetween(String value1, String value2) {
            addCriterion("MSG_OTHER not between", value1, value2, "msgOther");
            return (Criteria) this;
        }

        public Criteria andIdLikeInsensitive(String value) {
            addCriterion("upper(ID) like", value.toUpperCase(), "id");
            return (Criteria) this;
        }

        public Criteria andMsgFromLikeInsensitive(String value) {
            addCriterion("upper(MSG_FROM) like", value.toUpperCase(), "msgFrom");
            return (Criteria) this;
        }

        public Criteria andMsgToLikeInsensitive(String value) {
            addCriterion("upper(MSG_TO) like", value.toUpperCase(), "msgTo");
            return (Criteria) this;
        }

        public Criteria andMsgTypeLikeInsensitive(String value) {
            addCriterion("upper(MSG_TYPE) like", value.toUpperCase(), "msgType");
            return (Criteria) this;
        }

        public Criteria andMsgOtherLikeInsensitive(String value) {
            addCriterion("upper(MSG_OTHER) like", value.toUpperCase(), "msgOther");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

}